// components/merchantsItem/index.js
const { getDateDiff } = require('../../utils/utils')
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        data: Object
    },

    /**
     * 组件的初始数据
     */
    data: {
        time: ''
    },

    /**
     * 组件的方法列表
     */
  methods: {
    jump() {
      console.log(this.data.data.id,'id')
      wx.navigateTo({
        url: '/pages/businessdetails/index?id='+this.data.data.id,
      })
    }
  },
    attached: function() {
        let time = getDateDiff(this.data.data.createDate)
        this.setData({
            time
        })
    }
})
